package com.dj.product.k2faas.common.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * Created by 丁建 on 2025/9/23 08:32
 *
 * @author 丁建
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class K2Exception extends RuntimeException {

    private static final int DEFAULT_CODE = 500;

    private int errorCode = DEFAULT_CODE;

    public K2Exception(Throwable e) {
        super(e);
    }

    public K2Exception(String message) {
        super(message);
    }

    public K2Exception(int errorCode, String message) {
        super(message);
        this.errorCode = errorCode;
    }

}
